home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
boot tools
/
waitvalidation
/
waitvalidation.e
< prev
next >
Wrap
Text File
|
1996-04-07
|
2KB
|
85 lines
OPT PREPROCESS
->/////////////////////////////////////////////////////////////////////////////
MODULE 'dos/dos' , 'dos/dosextens'
->/////////////////////////////////////////////////////////////////////////////
->#define DEBUG13
#ifdef DEBUG13
#define KICK20 FALSE
#endif
#ifndef DEBUG13
#define KICK20 KickVersion( 36 )
#endif
->/////////////////////////////////////////////////////////////////////////////
PROC main()
DEF db : PTR TO doslibrary , dl : PTR TO doslist , di : PTR TO dosinfo , dl13
DEF ldevs = NIL : PTR TO LONG , conv_ptr : PTR TO CHAR , devname
DEF id : PTR TO infodata
->/////////////////////////////////////////////////////////////////////////
IF KICK20
dl := LockDosList( LDF_DEVICES OR LDF_READ )
ELSE
Forbid()
db := dosbase
di := BADDR( db.root.info )
dl13 := di.devinfo
dl := {dl13}
ENDIF
WHILE ( IF KICK20 THEN dl := NextDosEntry( dl , LDF_DEVICES )
ELSE dl := myNextDosEntry( dl , DLT_DEVICE ) )
IF dl.task
ldevs := Link( List( 2 ) , ldevs )
ldevs[] := dl.task
ldevs[1] := dl.name
ENDIF
ENDWHILE
IF KICK20
UnLockDosList( LDF_DEVICES OR LDF_READ )
ELSE
Permit()
ENDIF
->/////////////////////////////////////////////////////////////////////////
id := New( ( SIZEOF infodata ) + 4 )
id := ( id + 4 ) AND $FFFFFFFC
WHILE ldevs
DoPkt( ldevs[] , ACTION_DISK_INFO , MKBADDR( id ) , NIL , NIL , NIL , NIL )
IF id.diskstate = ID_VALIDATING
conv_ptr := Shl( ldevs[ 1 ] , 2 )
StrCopy( devname := String( conv_ptr[] + 1 ) , conv_ptr + 1 , conv_ptr[] )
PrintF( '\s: is validating !\nWaiting' , devname )
WHILE ( id.diskstate = ID_VALIDATING )
Delay( 2 * 50 )
DoPkt( ldevs[] , ACTION_DISK_INFO , MKBADDR( id ) , NIL , NIL , NIL , NIL )
PutStr( '.' )
ENDWHILE
PrintF( '\nValidation of \s: is terminated.\n\n' , devname )
ENDIF
ldevs := Next( ldevs )
ENDWHILE
ENDPROC
->/////////////////////////////////////////////////////////////////////////////
PROC myNextDosEntry( dl : PTR TO doslist , type )
WHILE ( dl := BADDR( dl.next ) ) DO EXIT ( dl.type = type )
ENDPROC dl
->/////////////////////////////////////////////////////////////////////////////
CHAR '$VER: WaitValidation 1.0 (16.12.95)'